package com.xz.courseschedule.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xz.courseschedule.entity.Task;
import com.xz.courseschedule.utils.Result;
import org.springframework.transaction.annotation.Transactional;


/**
 * 教学任务表接口
 */
public interface TaskService extends IService<Task> {

    Result getList();

    Result getById(Long id);

    Result add(Task task);

    Result update(Task task);

    Result delete(Long id);

    Result deleteBatch(Long[] ids);

    /**
     * 排课算法
     * @param id
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    Result courseScheduling(Long id);
}
